<script type="text/javascript">

	//require the menu
	<?php require_once 'instructions.php'; 
	 echo 'var jsApp = ' . json_encode($appetizers) . ";\n" 
	?>

	//call function to display item description
	function printApp() {
		var hold = '';
		for(i in jsApp) { //add input attributes
			hold += '<input type="button" onClick="selected(\'' + i + '\')" />' 
				+ jsApp[i]['description'] + '<br/>';
		} //conclude loop
		document.getElementById("menu").innerHTML = hold;
	} //conclude function with description

	//function is now selected
	function selected(item) {

		//modify selected item
		document.getElementById("choices").innerHTML += '<option value="' +
			item + '" id = "' + item + '" onClick="modify(\'' + item +
			'\')" >' + item + '</option><br/>'; 
	} //conclude selected function

	//function for modification
	function modify(item) {

		//prompt
		if(confirm("Would you like to modify this item?") == true) {
			var build = '<b>Without:&nbsp;</b>';
			for(i in jsApp[item]['build']) 
				build += '<input id="' + i + '" type="button" value="' + i + '" onClick="reRender(\'' + i + '\')" />'; 
			build += '<br/>';
			document.getElementById("bottom").innerHTML += build; 
		}
	} //conclude modification function

	//Rerender the class
	function reRender(item) {
		
	} //conclude the rerender class

</script>
